﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="admin_Logs_View.aspx.cs" Inherits="admin_Logs_View" %>
<%@ Import Namespace="Net.Ntalent.Action50.DataAccess"%>
<%@ Import Namespace="Net.Ntalent.Action50.Core.Util"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Admin_Logs</title>
<link type="text/css" rel="stylesheet" href="css/common.css" />
<link type="text/css" rel="stylesheet" href="css/admin.css" />

<!-- 弹出框所用头文件 S-->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/scripts.js"></script>


<!--[if IE 6]>
<style type="text/css">
* html,* html body /* 修正IE6振动bug */{background-image:url(about:blank);background-attachment:fixed;}
* html .fixed-top /* IE6 头部固定 */{position:absolute;margin-top:100px;bottom:auto;top:expression(eval(document.documentElement.scrollTop));}
</style>
<![endif]-->

<!--[if IE 6]>
<script src="js/DD_belatedPNG_0.0.8a.js" type="text/javascript"></script>
<script type="text/javascript">
DD_belatedPNG.fix('div, ul, img, li, input');
</script>
<![endif]-->
<!-- 弹出框所用头文件 E-->

<script language="javascript">
    function writeActionId(logsId) {
        var hiddenField = document.getElementById("HiddenField_actionToBeDelete");
        hiddenField.value = logsId;
    }
</script>

</head>

<body>
    <form id="form1" runat="server">
<div class="wrappera">
	<div class="wrapperb">
		<!-- 界面头部 S -->
		<div id="head" class="head">
			<!-- 界面头部 网站LOGO S -->
			<div id="site_logo">
			</div>
			<!-- 界面头部 网站LOGO E -->
			<div id="site_signal">Action Management</div>
			<!-- 界面头部 网站导航栏 S -->
			<div class="site_nav">
				<ul>
					<li class="nowPaged right"><a href="Default.aspx">HOME</a></li>
				</ul>
			</div>
			<!-- 界面头部 网站导航栏 E -->
		</div>
		<!-- 界面头部 E -->

		<!-- 界面主体部分 S -->
		<div class="mainBody">
			<div class="admin_box">
				<!-- 界面主体 管理界面导航栏 S -->
				<div class="admin_nav">
					<ul>
						<li><a href="admin_Basic_Information.aspx?actionId=<%=Request["actionId"] %>">Basic Information</a></li>
						<li class="nowPage" id="news"><a href="#">Log</a></li>
						<li><a href="admin_News_View.aspx?actionId=<%=Request["actionId"] %>">News</a></li>
						<li><a href="admin_Gallary.aspx?actionId=<%=Request["actionId"] %>">Gallery</a></li>
					</ul>
				</div>
				<!-- 界面主体 管理界面导航栏 E -->
				<!-- 界面主体 管理界面 用户信息 S -->
				<div class="userInfo">
					<img src="images/img_userFace.jpg" alt="" />
					<span>Welcome</span><span id="userName"><%=Session[Constants.SESSION_KEY_ADMIN_NAME]%></span><asp:LinkButton
ID="LinkButton2" runat="server" onclick="LinkButton2_Click">Logout</asp:LinkButton></div>
				<!-- 界面主体 管理界面 用户信息 S -->
				<!-- 界面主体 管理界面 信息列表 S -->
				<div class="newsList">
					<h2><a href="admin_Action_List.aspx">Admin > </a> 
                        <a href="admin_Basic_Information.aspx?actionId=<%=Request["actionId"] %>"> <%=Helper.getSubString(Helper.getActionNameById(Convert.ToInt64(Request["actionId"])), 25) %> > </a> 
 Log</h2>
					<div class="newsListContent">
						<div class="newsBanner">
							<div class="area_sort left">
								<h1>LOG LIST</h1>
<asp:LinkButton id="btn_sortdown" class="left" runat="server" onclick="btn_sortdown_Click"></asp:LinkButton>
<asp:LinkButton id="btn_sortup" class="left" runat="server" onclick="btn_sortup_Click"></asp:LinkButton>

								
							</div>
<a href="admin_Logs_Create.aspx?actionId=<%=Request["actionId"] %>" class="title_postNews right">Create Log</a>

									
						</div>
						
						<!-- 界面主体 管理界面 信息列表 内容 S -->
<asp:ListView ID="ListView1" runat="server" DataSourceID="ObjectDataSource1" 
                           
                           ondatabound="ListView1_DataBound">
    <LayoutTemplate>
        <asp:PlaceHolder id="itemPlaceholder" runat="server"></asp:PlaceHolder>
    </LayoutTemplate>

    <ItemTemplate>
						<div class="listA">
							<div class="newsIntro">
								<a href="admin_Logs_Edit.aspx?logsId=<%#((T_NEWS_AND_LOGS)Container.DataItem).Id%>"" class="linkD TitleA"><%#((T_NEWS_AND_LOGS)Container.DataItem).POST_DATETIME.ToString("dd/M - ") %><%#((T_NEWS_AND_LOGS)Container.DataItem).POST_TITLE %></a>
                                <div class="dateA"><%#((T_NEWS_AND_LOGS)Container.DataItem).POST_DATETIME.ToString("MMM d, yyyy")%></div>
							</div>
							<div class="area_edit">
<a  href="javascript:$('.popup').css('display','block');$('#alpha').css('display','block');writeActionId(<%#((T_NEWS_AND_LOGS)Container.DataItem).Id %>)" class="btn_Delete">Delete</a>
<a href="admin_Logs_Edit.aspx?logsId=<%#((T_NEWS_AND_LOGS)Container.DataItem).Id %>" class="btn_Edit">Edit</a>
							</div>
						</div>




    
    </ItemTemplate>

</asp:ListView>


						<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                            SelectMethod="RetrieveByAction" 
                            TypeName="Net.Ntalent.Action50.Core.Dao.NewsAndLogsDao">
                            <SelectParameters>
                                <asp:QueryStringParameter DefaultValue="0" Name="id" 
                                    QueryStringField="actionId" Type="Int64" />
                                <asp:Parameter DefaultValue="1" Name="newsAndLogsType" Type="Object" />
                                <asp:Parameter DefaultValue="0" Name="pageNumber" Type="Int32" />
                                <asp:Parameter DefaultValue="0" Name="pageSize" Type="Int32" />
                                <asp:Parameter DefaultValue="POST_DATETIME DESC" Name="orderBy" Type="String" />
                            </SelectParameters>
                        </asp:ObjectDataSource>


						<!-- 界面主体 管理界面 信息列表 内容 E -->
						
						<div class="turnPage right">

<asp:DataPager PagedControlID="ListView1" ID="DataPager1" runat="server" PageSize="15">
    <Fields>
        <asp:NextPreviousPagerField ButtonType="Link" ShowNextPageButton="false" ShowLastPageButton="false"
            ShowFirstPageButton="true"  FirstPageText="First"
            ShowPreviousPageButton="true" PreviousPageText="&lt; Previous" ButtonCssClass="linkB left" RenderNonBreakingSpacesBetweenControls="false"
             /> 

        <asp:NumericPagerField  ButtonType=Link CurrentPageLabelCssClass="linkC left" NumericButtonCssClass="linkC left" RenderNonBreakingSpacesBetweenControls="false" ButtonCount=10/>

        <asp:NextPreviousPagerField ButtonType="Link"  ButtonCssClass="linkB left" ShowFirstPageButton="false" ShowPreviousPageButton="false"
            ShowNextPageButton="true" NextPageText="Next &gt;"  RenderNonBreakingSpacesBetweenControls="false"
            ShowLastPageButton="true"  LastPageText="Last"/>
    </Fields>
</asp:DataPager>
						
						</div>

					</div>
				</div>
				<!-- 界面主体 管理界面 信息列表 E -->
			</div>
			
		</div>
		<!-- 界面主体部分 E -->
		
		<!-- 界面尾部 S -->
		<div id="footer" class="footer">
		</div>
		<!-- 界面尾部 E -->


	</div>
</div>

<!--pop窗口双删除实现 S-->
<div id="alpha" >
     <div class="popup fixed-top">
	        <h1>
		        <a class="closePopsup"></a>
	        </h1>
	        <div class="area_message">
	        <p>
		        <asp:Label ID="Message" runat="server" Text="REALLY WANT TO DELETE THE ACTION?"></asp:Label>   		
	        </p>
	        </div>
	        <p class="forBtn">
                <asp:LinkButton ID="sureBtn"  OnClick="DeleteAction" class=" linkE dbBtn" runat="server" 
                    >YES</asp:LinkButton>
		        <a class="dbBtn linkE">NO</a>
	        </p>
        </div>
</div>
    <asp:Literal ID="popupCmd" runat="server" Text=""></asp:Literal>
 <!--pop窗口双删除实现 E-->  
<asp:HiddenField ID="HiddenField_actionToBeDelete"  runat="server" />
    </form>

</body>

</html>

